home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
pctj8505.arc
/
BUG4.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-09-14
|
768b
|
27 lines
{ BUG4.PAS }
{ This program demonstrates how MS-Pascal 3.20 }
{ messes up when a WORD is multiplied by a }
{ constant and is then assigned to a double-word }
{ integer. }
{ }
PROGRAM bug4(output) ;
VAR
x : integer4 ;
i : integer ;
w : word ;
BEGIN {bug4}
w := 9 ;
i := 9 ;
writeln('BUG4 RESULTS') ;
writeln('w = ',w) ;
writeln('i = ',i) ;
writeln('Both answers should be 90000') ;
x := w * 10000 ;
writeln('w * 10000 = ',x) ;
x := i * 10000 ;
writeln('i * 10000 = ',x) ;
END. {bug4}